<%@ include file="/taglibs.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<head>
<title>北京邮电大学学生党员在线学习中心</title>
<link href="${ctx}/css/pagination.css" rel="stylesheet" type="text/css" />

	<script type="text/javascript">
		$(function(){
			var focusMenuId = '<%=request.getAttribute("flag") %>';
			$('#side_sub_menu_div_' + focusMenuId).attr('class', 'side_sub_menu_focus');
		});
	</script>

</head>
<div id="nav_bar">
    <img id="nav_bar_left" src="../../../styles/nav_bar_left.png" alt=""/>
    <div id="welcome_label">欢迎您，&nbsp;<s:property value="#session.session_user.adminName" />!</div>
    <img id="nav_bar_seperator" src="../../../styles/nav_bar_seperator.png" alt=""/>
    <div id="nav_location">
        <img id="nav_bar_point" src="../../../styles/nav_bar_point.png" alt="" />
        <div id="nav_cur_location">当前位置：&nbsp;<a href="${ctx}/AdminLearnCenterAction_adminLearnCenter">学习园地管理</a>&nbsp;&nbsp;>&nbsp;&nbsp;<span style="color:black;"><s:property value="moduleName"/></span></div>
    </div>
    <img style="float:right; width:5px;" src="../../../styles/nav_bar_right.png" alt=""/>
    <a id="nav_logout" href="${ctx}/logoutAction_adminLogout">[安全退出]</a>
</div>
<div style="clear:both; height:5px;">&nbsp;</div>

<div style="min-height:450px;">
	<div id="side_menu" style="min-height:660px;">
	    <div id="side_menu_title">
	        <img src="../../../styles/side_menu_title_img.png" alt="" />
	        <span>学习园地管理</span>
	    </div>
	    <div id="side_menu_title_bottom">&nbsp;</div>
	    <div id="side_sub_menu_div_1"  class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminLearnCenterAction_adminLearnCenter?flag=1">党的基本知识</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div id="side_sub_menu_div_2"  class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminLearnCenterAction_adminLearnCenter?flag=2">党的历史知识</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div  id="side_sub_menu_div_3"  class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminLearnCenterAction_adminLearnCenter?flag=3">党员常规事项</a>
	    </div>
	    <div class="side_menu_seperator">&nbsp;</div>
	    <div  id="side_sub_menu_div_4"  class="side_sub_menu">
	        <div class="side_menu_point">&nbsp;</div>
	        <a href="${ctx}/AdminLearnCenterAction_adminLearnCenter?flag=4">基层干部职责</a>
	    </div>
	</div>
	
	<div id="main_content">
	    <div id="main_content_title">
	        <img src="../../../styles/content_title_img.png" alt="" />
	        <span><s:property value="moduleName"/></span>
	    </div>
	    <div class="main_content_title_bottom">&nbsp;</div>


			<s:form action="AdminLearnCenterAction_adminLearnCenter" method="post" theme="simple">
				<table>
					<tr> 
						<td>请输入查询内容：</td>
						<td><input type="text" name="queryTitle" value="<s:property value="queryTitle"/>" size=60></td>
						<td style="width:60px;text-align:center;">
								<input type="submit"  name="button" id="button" class="input-button"  value="查询"/>
						 </td>
						 <td>
								<input id="learnCenter" name="learnCenter" type="button" class="input-button" value="发布<s:property value="moduleName"/>" onclick="window.location.href='${ctx}/AdminLearnCenterAction_toPostLearnCenter?flag=<s:property value="flag"/>&queryTitle=<s:property value="queryTitle"/>'" />
						 </td>
					</tr>
				</table>
				<input type="hidden" name="flag" value="${flag}" />
			</s:form>
		
		<br/>

		<table class="list-table" cellpadding="0" cellspacing="0">
			<tr bgcolor="#F1F4FB">
				<th align="center">标题</th>
				<th align="center">发布者</th>
				<th align="center">发布时间</th>
				<th align="center">操作</th>
			</tr>
			<s:iterator value="learnCenters" status="st">
				<tr>
					<td align="center">
					<a target="_blank" href="${ctx}/AdminLearnCenterAction_viewAdminLearnCenter?id=<s:property value="id"/>&flag=<s:property value="flag"/>" title="<s:property value="title"/>">
								 <s:if test="%{null!=title && title.length()>30}"> <s:property value="title.substring(0,29)+'...'"/></s:if>
                                 <s:else><s:property value="title"/></s:else>
								</a></td>
					<td align="center"><s:property value="posterName" /></td>
					<td align="center"><s:date name="posterTime" format="yyyy-MM-dd" /></td>
					<td align="center">
					    <a href="${ctx}/AdminLearnCenterAction_toUpdateLearnCenter?id=<s:property value="id"/>&flag=<s:property value="flag"/>&pageNow=<s:property value="pageNow"/>&queryTitle=<s:property value="queryTitle"/>">修改</a>
						<a onclick="return confirm('确定要删除该记录吗?')" 
		      href="${ctx}/AdminLearnCenterAction_deleteLearnCenter?id=<s:property value="id"/>&flag=<s:property value="flag"/>&pageNow=<s:property value="pageNow"/>&queryTitle=<s:property value="queryTitle"/>">删除</a>
					</td>
				</tr>
			</s:iterator>
		</table>
        
		
		<div style="clear:both; height:10px;"></div>

					<div style="margin-left:0; text-align: center;">
							<s:property value="paginationCode" escape="false"/>
					</div>
		</div>
		<div style="clear:both">&nbsp;</div>
</div>